package com.project.service.impl.backend;

import com.project.common.util.QueryUtils;
import com.project.dao.OrginDao;
import com.project.dao.bean.Organization;
import com.project.service.backend.OrganizationService;
import com.project.service.impl.BaseServiceImpl;

/**
 * 后台 组织注册 Dao Impl 
 * @author Sn
 *
 */
public class OrganizationServiceImpl extends BaseServiceImpl implements OrganizationService
{
	private OrginDao orgindao;
	
	//机构信息添加方法
	public void save(Organization organ) 
	{
		try 
		{
			orgindao.save(organ);
			
		} catch (Exception e) 
		{
			e.printStackTrace();
		}
	}

	//机构信息删除方法
	public void deleteorgin(String id) 
	{
		try 
		{
			orgindao.delete(id);
			
		} catch (Exception e) 
		{
			e.printStackTrace();
		}
	}

	//根据传入的id返回一条机构信息方法
	public Organization findbyid(String id) 
	{
		Organization orgin=orgindao.findbyid(id);
		return orgin;
	}

	//机构信息更新方法
	public void updateorgin(Organization orgin) 
	{
		orgindao.updateorgin(orgin);		
	}

	//带分页的显示方法
	public QueryUtils listorgin(QueryUtils page) 
	{
		page=orgindao.listorgin(page);
		return page;
	}

	public OrginDao getOrgindao() {
		return orgindao;
	}

	public void setOrgindao(OrginDao orgindao) {
		this.orgindao = orgindao;
	}
	
}
